package com.my.dubbo.consumer;


import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.my.dubbo.provider.service.ProviderService;

public class App {

	public static void main(String[] args) throws IOException {
		//加载xml配置文件启动
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("consumer.xml");
		context.start();
		ProviderService providerService = (ProviderService)context.getBean("providerService");
		System.out.println(providerService.sayHello("hello  dubbo"));
		System.in.read();
	}

}
